package pers.amos.eshop.advance.data.sync.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import pers.amos.eshop.advance.data.sync.service.fallback.ProductServiceFallback;

/**
 * @author amos wong
 * @create 2020-12-16 9:03 上午
 */
@FeignClient(value = "eshop-product-service", fallback = ProductServiceFallback.class)
public interface ProductService {

    @GetMapping("/brand/findById")
    String findBrandById(@RequestParam("id") Long id);

    /**
     * 批量查询的接口
     *
     * @param ids
     * @return
     */
    @GetMapping("/brand/findByIds")
    String findBrandListByIds(@RequestParam("ids") String ids);

    @GetMapping("/category/findById")
    String findCategoryById(@RequestParam("id") Long id);

    @GetMapping("/product/findById")
    String findProductById(@RequestParam("id") Long id);

    @GetMapping("/product-intro/findById")
    String findProductIntroById(@RequestParam("id") Long id);

    @GetMapping("/product-property/findById")
    String findProductPropertyById(@RequestParam("id") Long id);

    @GetMapping("/product-specification/findById")
    String findProductSpecificationById(@RequestParam("id") Long id);
}
